﻿
using DataService.Core.Encrypt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UnitTest
{
    public class TestRSAHelper
    {
        public void TestDencrypt()
        {
            string privateKey = "PFJTQUtleVZhbHVlPjxNb2R1bHVzPm5pOCtMdVA3cDdXZlJaTERMMmJaTldMMG9ESFU0TGJVY3p5VGF6dUJNVlI3M3JGb005QjBpZTdUdEFNVGNSS3M4N25zSE9xNThzYjMxbHBFTHpROGltSDA5ZWpEZGdUc2gzS0xJVkJ4aEpaVHdrOGpDNnpmdm1tczRNc0tqYlhqejZiZGhXTHRJakk5ZC9NTFNXemNSVHIvNkxoQ3N2UENVTXBhc2N3TlJaRT08L01vZHVsdXM+PEV4cG9uZW50PkFRQUI8L0V4cG9uZW50PjxQPnpjT0crRU5ramt6UDUyTVpXeE5paFBON1hsWlRxTkJnYzJOTFNIeTdvcVVWazlhdHIwdVFreWRsS003ZTFPdmxoYTVVSFNUa29acjFpY2pnZ0RlblR3PT08L1A+PFE+eE0zMWIzdjBwVlBzNVJzdng1dHNJeGdTT0NhMmI0ZlBLUjNkdDhLNWNHM1FodjVxU0ZUU3Brb2ZYb29rUHlqblM1ZmZnclgreXBHNGdBVkRETjhOSHc9PTwvUT48RFA+WlA4Y09LK2JvOTFBRHlzdFB1Nzg1SlUrY01lZXVMWFBJZFFURjdsaHdDdVhzOEVqNzI3L3Y3c09oRUZHVHV5YTlFcmxMb2oxVC8xbm1BSHBjQVhoTVE9PTwvRFA+PERRPmxPYkRpUHIvS2N0cTFCa1N1SEoyaWNMZm5nNWtQOVJBUC9xeDB5UUlTL0U2TWJqeVR4R21ZMXgzaVg3NVY3UXA4NzdQeEVUUXB4RkR4OUN6WDF5dnZ3PT08L0RRPjxJbnZlcnNlUT5udWM1cUxuWDYyWTBNYkZNTHhva3EzS1ZwZ0NXanBKRkEwYWo4Q0FwU2p4a1h4MDAxOXp6ZzhydEJFV25iQS96UEhWNjhlR09Ec3llTk41cklvTW0vdz09PC9JbnZlcnNlUT48RD5oQzMvN1JqT2tiNS9mNWg2aHlLUEFFQlhINEZrVy80S210eVVadmVMSmhodGhaR0MvRUVGRUxsRHA5a21Kc2N2UkY0b3dhVVdpcHJlUC95Zm16NHdFellRN2xmemdzMFZZeG5NQTl5Qkpwc2ROUWpTbHVGeFFNK0s1NEtLb1dSejQ2UUM2c1BObG9xNWlnZUZLYWxIelFPempYTCtVL2o4L2NtZDZjTU5NQTA9PC9EPjwvUlNBS2V5VmFsdWU+";
            string connStr = "AuAeBpS2dcH+lfNNQF3jJqxAT60rh+CHcjvXAYyOeDWeiy43t/KRpOytFVJk2NBtB/i7bPK7vjB8qYpg94oOhA6Jl4eEk4A1jzgMuzLt9EtPP9pC8XJFFA+Eh9tw9oBIXiVAC5wCAXD23WJVO+E+DtqXMPqc/wD/FBOlGCYpgOOVgTsFi4snf2pW8KCe+29n0PKgtuKcgbbUT3dNFpi+rWNccVviaLhED9g82BIylqoD7wPU+ZPmYjx7NyjcDQkDw/60uyYsP7mU1jHAxf1jUf2169jn4Bba2h+jyuZjP/J7gXp5B2MUm+q+eno+8Yd6bnBCj0CbFhndeV1uclr70Q==";
            connStr = RSAHelper.RSADecrypt(privateKey, connStr);
            Console.WriteLine(connStr);
        }


    }
}
